home *** CD-ROM | disk | FTP | other *** search
/ PC Active 2009 July/August / PC Active NR.227.iso / Software / Games / windows / Freeciv-2.1.9-win32-gtk2-setup.exe / doc / README.cma < prev    next >
Encoding:
Text File  |  2009-03-25  |  10.6 KB  |  229 lines

  1.  
  2.   Citizen Governor (aka Citizen Management Agent, or CMA)
  3. ==================================
  4.  
  5. The CMA is a rather new tool built into the GTK+ client of Freeciv
  6. version 1.12.1. It is designed to help you manage your cities, i.e.
  7. deploy the workers on the available tiles around (or make them
  8. scientists, taxmen, or even entertainers), to get the most out of the
  9. city. You can switch the CMA on or off at any time for any city, but
  10. there are some handicaps (explained below), if you have CMA'd and
  11. non-CMA'd cities nearby. In any case you need an actual 1.12.1 or
  12. above server; the CMA won't run with server version 1.12.0.
  13.  
  14. The heart of CMA is an optimizing algorithm, that tries to deploy the
  15. workers of a city in such a way, that a user-defined goal is achieved
  16. as much as possible. You know probably, there is already a kind of
  17. optimizing, when you open a city, and click on the center tile (the
  18. city symbol) of the mini map. This optimization tries to maximize
  19. mostly the science output; but it doesn't care about disorder.
  20.  
  21. The new City Management Agent goes far beyond this old form of
  22. optimizing. First, it performs this task everytime anything changes
  23. with the city. If the city grows or shrinks, troops go in or out,
  24. tiles get irrigation or mining, or are occupied by an enemy, the CMA
  25. becomes active. Second, it supports all kinds of optimizing, like
  26. production (shields), gold, science, or luxury. Third, it gives the
  27. player a fine-grained control over this, with the possibility of
  28. setting constraints for any kind of city output. The latter includes
  29. the constraint of celebration, which makes it very easy to let your
  30. cities grow, even in harder times. The forth, and probably most
  31. valuable thing in war times, is that is keeps your cities content,
  32. preventing them from revolt.
  33.  
  34.  
  35.   Usage
  36. =========
  37.  
  38. You can set up the CMA for a city by opening the city window and
  39. clicking on the CMA tab. On the left side, you can choose a preset for
  40. a specified goal, on the right side you can specify more complex goals
  41. by moving the sliders. You can choose a preset at first, and then
  42. modify it. Once you have created a new setting, you can add a preset
  43. name for it. This is not required, but very useful, since you can
  44. watch and even change the city's setting from within the city report,
  45. if it is given a name. Don't forget to save settings (in the Game
  46. menu), when you've created new presets.
  47.  
  48. The sliders are of two kinds: the rightmost sliders are factors, which
  49. gauges how much one product is worth compared to the others (e.g how
  50. much shields are worth with respect to everything else). The leftmost
  51. sliders are constraints: you can command the city not to lose food,
  52. e.g. by setting the surplus constraint to zero; and you can allow the
  53. city to lose gold by setting the gold surplus to -3 e.g., and urge
  54. them to make at least 5 shields per round by setting the production
  55. surplus to 5. The most powerful constraint, though, is the Celebrate
  56. contraint, which makes the city celebrate at once (which usually takes
  57. effect the round after you change it).
  58.  
  59. It is obvious that the CMA can't fulfill all these constraints in
  60. every case. Whenever the constraints can't be fulfilled, the CMA quits
  61. its service for that city, giving a message: "The agent can't fulfill
  62. the requirements for Berlin. Passing back control." You then have the
  63. choice of either managing the city on your own (which has some
  64. drawbacks, see below), or open that city and change the surplus
  65. requirements so that they can be fulfilled.
  66.  
  67. When you have made a setup for a city, you need to click on 
  68. "Control city" to switch on the CMA. If this button's text is greyed,
  69. either the CMA is already active, or the task is impossible. In the
  70. latter case you see dashes instead of numbers in the results block.
  71. If you ever want to switch off the CMA deliberately, click "Release
  72. city".
  73.  
  74.  
  75.   Advanced Usage
  76. ==================
  77.  
  78. There is not much experience using the CMA yet, but some common
  79. remarks may be helpful. Usually the goal(s) of your cities depend on
  80. the phase your game is in, whether you want to spread widely, grow
  81. quickly, research advanced techs or wage war. You may want to set up a
  82. high factor for science to research, or a high shields factor to
  83. produce units. The highest factor available is 25, that means: if the
  84. shields factor is set to 25, and other to 1, the CMA prefers a single
  85. shield over 25 gold (or trade also). This is pretty much because money
  86. can buy units too. That also means that the CMA is indifferent about
  87. producing gold, science, luxury, and food; but when you wage war, you
  88. usually prefer gold or luxury. So it's probably a good idea to set a
  89. second (or even third) preference for the city's output, e.g. gold
  90. factor 5. That still prefers 1 shield over 5 gold (and 1 gold over 5
  91. food or anything else).
  92.  
  93. Constraints aren't useful in all cases. If you want a high income,
  94. it's probably better to set the gold factor to 25, than to set a
  95. minimal surplus of 5 or so. Because a big city can make more gold than
  96. a small one, you'd end up setting a different surplus for each city.
  97.  
  98. However, if the shields surplus of a city is below zero, it cannot
  99. support all of its units any more. You will lose some of the units the
  100. city supports. If the food surplus is negative, the city will starve
  101. and eventually (when the granary is empty) shrink. This may be
  102. intended, but if the city supports any settlers, you will lose them
  103. before the city shrinks. Constraints can also have a warning function.
  104.  
  105. Which constraints can be fulfilled depends widely on the global
  106. science, tax, and luxury rates. E.g. a gold surplus >= 0 is easier to
  107. fulfill with a higher tax rate than a lower one. You should always
  108. consider to change these rates, when you going to change the CMA
  109. settings for the most of your cities.
  110.  
  111. Hint: To avoid acidentally releasing your cities, when you change the
  112. rates, it is best to do so from within the tax dialog rather than from
  113. the rates display in the main window.
  114.  
  115.  
  116.   Drawbacks
  117. =============
  118.  
  119. The CMA is a very powerful tool, which not only releases you from the
  120. micromanagement of your cities, but gives you more performance than
  121. you have ever seen (well, for most players).
  122.  
  123. There are some drawbacks, though. Once you've switched on the CMA, it
  124. grabs any good tile it can get. So you encounter very hard times
  125. trying to manage a city nearby a CMA-controlled one. This is true for
  126. the city window and the main map worker's interface as well. If you
  127. want to have CMA-controlled and "handmade" cities, they probably
  128. should be on different islands.
  129.  
  130. There are several situations where the CMA can't fulfill the
  131. requirements just temporarely, e.g. when you move a ship from one city
  132. to another, or when an enemy walks through your country. The CMA
  133. passes back control in these cases, and you have to reenable it
  134. manually. A general approach to prevent this might be, to set the
  135. minimal surpluses as low as possible (-20). Of course you must be
  136. careful with the food and shield surplusses.
  137.  
  138. While the CMA does a really good job for a single city, no tile will
  139. ever be released for the good of another city. Also, the CMA'd cities
  140. are computed in a more random order; the results may depend on it and
  141. change, when a recalculation is done (when tax changes e.g.). So, no
  142. guarantee is given that the overall results are always optimal.
  143.  
  144.  
  145.   Settings file
  146. =================
  147.  
  148. The client allows the user to load and save preset parameters for the
  149. agent. Choosing "Save Settings" from the "Game" menu will not only
  150. save your general options and message options, but it will save any
  151. changes you made to you CMA presets as well.
  152.  
  153. The format for the options file (usually ~/.civclientrc) is as follows
  154. (in case you which to change these presets manually, i.e. with a text
  155. editor).
  156.  
  157. Under the heading [cma], is a "number_of_presets". This should be set
  158. to the number of presets that are present in the options file. If you
  159. manually add or remove a preset, you need to change this number as
  160. appropriate.
  161.  
  162. After this, is an array that houses the presets. Here is the header:
  163.  
  164. preset={ "name","minsurp0","factor0","minsurp1","factor1","minsurp2",
  165. "factor2","minsurp3","factor3","minsurp4","factor4","minsurp5",
  166. "factor5","reqhappy","factortarget","happyfactor"
  167.  
  168. so the order of the preset should be as follows: 
  169.  
  170. name of preset, minimal surplus 0, factor 0, ... , 
  171. require city to be happy, what the target should be [0,1], 
  172. the happiness factor
  173.  
  174. Currently there are 6 surpluses and factors. They are:
  175. 0 = food, 1 = production, 2 = trade, 3 = gold, 4 = luxury,
  176. 5 = science
  177.  
  178. Also currently, "factortarget" is not changeable within the client,
  179. see "client/agents/cma_core.h" for more information.
  180.  
  181. The array should be terminated with a '}'.
  182.  
  183. Here are 21 presets you can use if you can't come up with some on 
  184. your own:
  185.  
  186. "Max food",0,10,0,1,0,1,0,1,0,1,0,1,0,0,1
  187. "Max production",0,1,0,10,0,1,0,1,0,1,0,1,0,0,1
  188. "Max trade",0,1,0,1,0,10,0,1,0,1,0,1,0,0,1
  189. "Max tax",0,1,0,1,0,1,0,10,0,1,0,1,0,0,1
  190. "Max luxury",0,1,0,1,0,1,0,1,0,10,0,1,0,0,1
  191. "Max science",0,1,0,1,0,1,0,1,0,1,0,10,0,0,1
  192. "+2 food",2,1,0,1,0,1,0,1,0,1,0,1,0,0,1
  193. "+2 production",0,1,2,1,0,1,0,1,0,1,0,1,0,0,1
  194. "+2 trade",0,1,0,1,2,1,0,1,0,1,0,1,0,0,1
  195. "+2 gold",0,1,0,1,0,1,2,1,0,1,0,1,0,0,1
  196. "+2 luxury",0,1,0,1,0,1,0,1,2,1,0,1,0,0,1
  197. "+2 science",0,1,0,1,0,1,0,1,0,1,2,1,0,0,1
  198. "Max food no gold limit",0,10,0,1,0,1,-20,1,0,1,0,1,0,0,1
  199. "Max production no gold limit",0,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
  200. "Max trade no gold limit",0,1,0,1,0,10,-20,1,0,1,0,1,0,0,1
  201. "Max gold no gold limit",0,1,0,1,0,1,-20,10,0,1,0,1,0,0,1
  202. "Max luxury no gold limit",0,1,0,1,0,1,-20,1,0,10,0,1,0,0,1
  203. "Max science no gold limit",0,1,0,1,0,1,-20,1,0,1,0,10,0,0,1
  204. "Max food+prod. no gold limit",0,10,0,10,0,1,-20,1,0,1,0,1,0,0,1
  205. "Max food+prod.+trade",0,10,0,10,0,10,0,1,0,1,0,1,0,0,1
  206. "Max all",0,1,0,1,0,1,0,1,0,1,0,1,0,0,1
  207.  
  208. here are 6 more that have been added as an afterthought:
  209.  
  210. "+1 food, max prod. no gold limit",1,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
  211. "+2 food, max prod. no gold limit",2,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
  212. "+3 food, max prod. no gold limit",3,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
  213. "+4 food, max prod. no gold limit",4,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
  214. "+5 food, max prod. no gold limit",5,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
  215. "+6 food, max prod. no gold limit",6,1,0,10,0,1,-20,1,0,1,0,1,0,0,1
  216.  
  217. and even more, some with multiple goals:
  218.  
  219. "research at any cost",0,1,0,5,-20,1,-20,1,-20,1,-20,25,0,0,1
  220. "celebration and growing",1,1,0,25,-20,1,-20,12,-20,1,-20,1,1,0,1
  221. "grow at any cost",1,25,0,5,-20,1,-20,1,-20,1,-20,5,0,0,1
  222. "research and some shields",0,1,0,8,0,1,-3,1,0,1,0,25,0,0,1
  223. "shields and a bit money",0,1,0,25,0,1,-3,3,0,1,0,1,0,0,1
  224. "many shields and some money",0,1,0,25,0,1,0,9,0,1,0,1,0,0,1
  225. "shields and some research",0,1,0,25,0,1,-2,1,0,1,0,8,0,0,1
  226. "celebrate and grow at once",1,1,0,25,-20,1,-20,1,-20,1,-20,8,1,0,1
  227.  
  228. Last updated: 9 Jan 2002
  229.